<template>
  <div class="ApiBasicEditor"> <Editor /> </div>
</template>

<script lang="ts" setup>
import { PropType } from 'vue'
import { CenterVO } from '@/api/res/ResCenter'

import { Editor } from '@/components/Editor'

defineOptions({
  name: 'FormBaseSetting'
})

const props = defineProps({
  dsgnItem: {
    type: Object as PropType<CenterVO | null>,
    required: true
  }
})
// const props= defineProps({
//   dsgnItem: {
//     type: Object as PropType<CenterVO,null>,
//     required: true
//   }
// })

const designerMixin = inject('designerMixin')
if (!designerMixin) {
  throw new Error('designerMixin is not provided')
}

const formLoading = ref(false) // 表单的加载中：1）修改时的数据加载；2）提交的按钮禁用
const formRules = reactive({})

const dsgnItem = ref(props.dsgnItem)
</script>

<style scoped lang="scss">
.ApiBasicEditor {
  position: relative;
  max-width: 800px;
  margin: 10px auto; /* 这行代码使元素水平居中 */
}
</style>
